package com.chen.nongansampling.retrofit;

import com.chen.nongansampling.bean.Callback;
import com.chen.nongansampling.bean.LoginRequest;
import com.chen.nongansampling.bean.OperatingBean;
import com.chen.nongansampling.bean.RiskMonitoringResponseBean;
import com.chen.nongansampling.bean.SampledListBean;
import com.chen.nongansampling.bean.SimpleRequest;
import com.chen.nongansampling.bean.TianjiaCaiYnagRequest;
import com.chen.nongansampling.bean.TodayResponseBean;
import com.chen.nongansampling.bean.UpdateOperatingRequest;
import com.chen.nongansampling.bean.getOperatingByPkId;
import com.chen.nongansampling.bean.getOperatingType;
import com.chen.nongansampling.bean.getOperingByPkIdRequest;
import com.chen.nongansampling.bean.notice.NoticeBean;
import com.chen.nongansampling.bean.qrcode.FormatBySamplingBean;
import com.chen.nongansampling.bean.qrcode.QRcodeCallback;
import com.chen.nongansampling.bean.qrcode.QRcodeRequest;
import com.chen.nongansampling.bean.request.ChangePasswordRequest;
import com.chen.nongansampling.bean.request.GetSampledRequest;
import com.chen.nongansampling.bean.request.InsertOperatingRequest;
import com.chen.nongansampling.bean.risk.RiskMonitorRequest;
import com.chen.nongansampling.bean.sample.SampleCallbackData;
import com.chen.nongansampling.bean.sample.TypeList;
import com.chen.nongansampling.bean.sample.insert.SamplingRequset;
import com.chen.nongansampling.model.Account;
import com.chen.nongansampling.model.CallbackData;
import com.chen.nongansampling.model.Market;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface RetrofitApiService {
    @Headers({"Content-Type: application/json","Accept: application/json"})//登陆
     @POST("API/Login")
    Observable<CallbackData<Account>> getLoginResponseInfo(@Body LoginRequest loginRequest);


    @Headers({"Content-Type: application/json","Accept: application/json"})//获取全部市场
    @POST("API/getMarket")
    Observable<CallbackData<List<Market>>> getMarketResponseInfo(@Body SimpleRequest simpleRequest);





    @Headers({"Content-Type: application/json","Accept: application/json"})//风险检测
    @POST("API/getRiskMonitoring")
    Observable<CallbackData<List<RiskMonitoringResponseBean>>> getRiskMonitoringResponseInfo(@Body RiskMonitorRequest riskMonitorRequest);


    @Headers({"Content-Type: application/json","Accept: application/json"})//风险检测
    @POST("API/getOperating")
    Observable<CallbackData<List<OperatingBean>>> getOperatingResponseInfo(@Body SimpleRequest simpleRequest);



    @Headers({"Content-Type: application/json","Accept: application/json"})//风险检测
    @POST("API/getToday")
    Observable<TodayResponseBean> getTodayResponseInfo(@Body SimpleRequest simpleRequest);



    @Headers({"Content-Type: application/json","Accept: application/json"})//获取所有检测类型
    @POST("API/getDetectionType")
    Observable<TodayResponseBean> getDetectionType(@Body SimpleRequest simpleRequest);


    @Headers({"Content-Type: application/json","Accept: application/json"})// 获取经营种类
    @POST("API/getOperatingType")
    Observable<CallbackData<List<getOperatingType>>> getAddOperatortype(@Body SimpleRequest samplingRequset);
    @Headers({"Content-Type: application/json","Accept: application/json"})// 获取经营户信息
    @POST("API/getOperatingByPkId")
    Observable<CallbackData<List<getOperatingByPkId>>> getOperatingByPkId(@Body getOperingByPkIdRequest samplingRequset);
//    @Headers({"Content-Type: application/json","Accept: application/json"})// 获取检测方法BY检测类型ID
//    @POST("API/getDetectionType")
//    Observable<TodayResponseBean> getDetectionType(@Body SimpleRequest simpleRequest);




        @Headers({"Content-Type: application/json","Accept: application/json"})// 获取检测方法BY检测类型ID
    @POST("API/getSamplingName")
    Observable<CallbackData<List<TypeList>>> getSamplingNameResponseInfo(@Body SimpleRequest simpleRequest);




    @Headers({"Content-Type: application/json","Accept: application/json"})// 获取检测方法BY检测类型ID
    @POST("API/getDeTypeAndName")
    Observable<CallbackData<List<TypeList>>> getDeTypeAndNameResponseInfo(@Body SimpleRequest simpleRequest);


    @Headers({"Content-Type: application/json","Accept: application/json"})// 获取检测方法BY检测类型ID
    @POST("API/insertSampling")
    Observable<SampleCallbackData> getInsertSamplingResponseInfo(@Body SamplingRequset samplingRequset);




    @Headers({"Content-Type: application/json","Accept: application/json"})// 获取检测方法BY检测类型ID
    @POST("API/getUrlBySamplingPkId")
    Observable<QRcodeCallback> getUrlBySamplingPkId(@Body QRcodeRequest qRcodeRequest);

    @Headers({"Content-Type: application/json","Accept: application/json"})// 获取检测方法BY检测类型ID
    @POST("API/getNotices")
    Observable<CallbackData<List<NoticeBean>>> getNoticesResponseInfo(@Body SimpleRequest simpleRequest);


    @Headers({"Content-Type: application/json","Accept: application/json"})// 获取搜索样品信息
    @POST("API/getSampled")
    Observable<CallbackData<List<SampledListBean>>> getSampledListResponseInfo(@Body GetSampledRequest getSampledRequest);



    @Headers({"Content-Type: application/json","Accept: application/json"})// 获取检测方法BY检测类型ID
    @POST("API/ChangePassword")
    Observable<Callback> getChangePasswordResponseInfo(@Body ChangePasswordRequest changePasswordRequest);


    @Headers({"Content-Type: application/json","Accept: application/json"})// 添加新的经营户
    @POST("API/insertOperating")
    Observable<Callback> insertOperatingResponseInfo(@Body InsertOperatingRequest insertOperatingRequest);

    @Headers({"Content-Type: application/json","Accept: application/json"})// 编辑经营户
    @POST("API/UpdateOperating")
    Observable<Callback> updateOperatingResponseInfo(@Body UpdateOperatingRequest updateOperatingRequest);
//    @Headers({"Content-Type: application/json","Accept: application/json"})// 获取检测方法BY检测类型ID
//    @POST("API/getFormatBySamplingPkId")
//    Observable<CallbackData<List<SampledListBean>>> getFormatBySamplingPkIdResponseInfo(@Body QRcodeRequest qRcodeRequest);
@Headers({"Content-Type: application/json","Accept: application/json"})//17. 获取采样的信息
@POST("API/getFormatBySamplingPkId")
Observable<FormatBySamplingBean> getFormatBySamplingPkIdReseponseInfo(@Body QRcodeRequest qRcodeRequest);

    @Headers({"Content-Type: application/json","Accept: application/json"})//17. 新增样品名称
    @POST("API/insertSampleName")
    Observable<Callback> updateCaiYangResponseInfo(@Body TianjiaCaiYnagRequest tianjiaCaiYnagRequest);
}
